package test;



public class Solution {
    public static void main(String[] args) {
        int num = 9;
        int sum =0;
        String s = Integer.toOctalString(Integer.parseInt(args[0]));
        for(int i =0;i<s.length();i++){
            sum+=(s.charAt(i)-48);//char 转int -48
        }
        System.out.println(sum);

    }
}



